package com.ruoyi.weixin.service.impl;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.domain.AlipayTradePrecreateModel;
import com.alipay.api.request.AlipayTradePrecreateRequest;
import com.alipay.api.response.AlipayTradePrecreateResponse;
import com.ruoyi.common.utils.alipay.GenerateNum;
import com.ruoyi.common.utils.qrcode.QrCodeResponse;
import com.ruoyi.common.utils.qrcode.QrResponse;
import com.ruoyi.common.utils.weixin.QRCodeUtil;
import com.ruoyi.framework.config.AlipayConfig;
import com.ruoyi.weixin.domain.KssCourses;
import com.ruoyi.weixin.domain.OrderDetail;
import com.ruoyi.weixin.mapper.OrderDetailMapper;
import com.ruoyi.weixin.service.AlipayService;
import com.ruoyi.weixin.service.IKssCoursesService;
import com.ruoyi.weixin.service.IOrderDetailService;
import com.ruoyi.weixin.vo.PayVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.FileCopyUtils;
import org.springframework.util.ResourceUtils;

import javax.imageio.ImageIO;
import javax.imageio.stream.ImageOutputStream;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.List;
import java.util.Map;

/**
 * @author 徐柯
 * @Title:
 * @Package
 * @Description:
 * @date 2021/3/2922:18
 */
@Service
public class OrderDetailServiceImpl implements IOrderDetailService {

    @Autowired
    private OrderDetailMapper orderDetailMapper;

    @Override
    public int insertOrderDetail(OrderDetail orderDetail) {
        return orderDetailMapper.insertOrderDetail(orderDetail);
    }

    @Override
    public List<OrderDetail> selectOrderDetailList(OrderDetail orderDetail) {
        return orderDetailMapper.selectOrderDetailList(orderDetail);
    }
    @Override

    public int insertCode(Map map){
        return orderDetailMapper.insertCode(map);
    }
}